package com.bmw.regist.controller;


import com.bmw.regist.model.http.UserReq;
import com.bmw.regist.service.RegistService;
import com.bmw.seckill.common.base.BaseResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;


@RestController
@RequestMapping(value = "/regist")
@Slf4j
public class RegistController {
    @Autowired
    private RegistService registService;
    @PostMapping("/setSms")
    public BaseResponse setSms(@Valid @RequestBody UserReq req) throws Exception {
         return BaseResponse.ok(registService.regist(req));
    }
}
